<template>
    <div>
      <h1>Counter: {{ count }}</h1>
      <button @click="increment">Increment</button>
      <button @click="decrement">Decrement</button>
    </div>
  </template>
  
  <script>
  import { mapActions } from 'vuex';
  export default {
    computed: {
      count() {
        return this.$store.getters.count;
      }
    },
    methods: {
      ...mapActions('user', ['increment', 'decrement'])
    },
    mounted(){
      console.log(this)
    }
  };
  </script>
  